package org.springblade.modules.platform.vo.enums;

import java.util.HashMap;
import java.util.Map;

public enum ProductTypeEnum {

    HT_MEASURING_PLATFORM("HT-MEASURING-PLATFORM",0),
    HT_PERPENDICULOMETER("HT-PERPENDICULOMETER",1),
    HT_DOUBLE_MARKER("HT-DOUBLE-MARKER",2),
    HT_GONIOMETER("HT-GONIOMETER",3),
	HT_ACQUISITION("HT-ACQUISITION",4),
   ;


    private Integer msg;
    private String code;


    private static Map<String, ProductTypeEnum> valueMap;

    static {
        valueMap = new HashMap<>();
        for (ProductTypeEnum e : values()){
            valueMap.put(e.code, e);
        }
    }
    ProductTypeEnum(String code, Integer msg){
        this.code = code;
        this.msg = msg;
    }
    public static ProductTypeEnum getEnum(String key) {
        if (!valueMap.containsKey(key)) {
            return null;
        }
        return valueMap.get(key);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getMsg() {
        return msg;
    }

    public void setMsg(Integer msg) {
        this.msg = msg;
    }
}
